//
// Created by Administrator on 2020/1/14.
//

#include "process_utils.h"
#include "string_utils.h"
#include "shell_utils.h"

int get_process_name(int pid,std::string &result) {
    std::string cmd="cat /proc/";
    cmd.append(itoa(pid));
    cmd.append("/cmdline");
    return shell_with_return(cmd,result);
}
